home *** CD-ROM | disk | FTP | other *** search
- // Mode X Sprite Library
- // Copyright (C) 1992 Court Demas -- court+@cmu.edu
-
-
- #include "etc.h"
-
-
- // Update the position of the object based on it's speed and direction.
- // Supports up to 8 directions at this point.
- // Obviously does NOT take into account the fact that you go faster when
- // heading on a diagonal. (you should do a Move*(speed*sqrt(2)/2) or
- // speed*cos(45) in each direction).
-
- void TPVector::Update_Position(void) {
-
- MoveRight(GetDeltaX());
- MoveDown(GetDeltaY());
- /*
- switch (GetDirection()) {
- case UP : MoveUp(Speed); break;
- case UPRIGHT : MoveUp(Speed); MoveRight(Speed); break;
- case RIGHT : MoveRight(Speed); break;
- case DOWNRIGHT : MoveRight(Speed); MoveDown(Speed); break;
- case DOWN : MoveDown(Speed); break;
- case DOWNLEFT : MoveDown(Speed); MoveLeft(Speed); break;
- case LEFT : MoveLeft(Speed); break;
- case UPLEFT : MoveLeft(Speed); MoveUp(Speed); break;
- }
- */
- }
- //*****************************************************************************
- // End of etc.cpp
-